﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using AidBrella.Entities;

namespace AidBrella.WCFServiceWebRole
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IAidBrellaService
    {
        /// <summary>
        /// Create a new user
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="firstName"></param>
        /// <param name="lastName"></param>
        /// <param name="email"></param>
        [OperationContract]
        void CreateUser(string userName, string firstName, string lastName, string email);
       
        [OperationContract]
        IList<ProjectSite> GetProjectSites(int projectId);

        [OperationContract]
        void AddProjectSite(int projectId, double longitude, double latitude);

        [OperationContract]
        void DeleteProjectSite(int projectSiteId, int projectId);

        [OperationContract]
        List<Organization> GetOrganizations();

        [OperationContract] 
        Organization GetOrganization(int organizationId);
        [OperationContract] 
        User GetUser(int userid);
        [OperationContract] 
        List<Project> GetProjectsOfOrganization(int organizationId);
        [OperationContract] 
        List<User> GetUsersOfProject(int projectId);
        [OperationContract] 
        List<User> GetUsersOfOrganization(int organizationId);
        [OperationContract] 
        List<Project> GetProjectsForUser(int userId);
        [OperationContract] 
        List<OrganizationRoleUser> GetRolesForUserInOrganization(int userId);
        [OperationContract] 
        List<ProjectSite> GetSitesForProject(int projectId);
        [OperationContract] 
        List<ProjectSite> GetSitesForOrganization(int organizationId);
        [OperationContract] 
        List<User> GetUsersForSite(int siteId);
        [OperationContract] 
        List<ProjectSite> GetNearbySites(double lat, double lon);
        [OperationContract]
        Project GetProjectById(int id);
        /// <summary>
        /// Return Organization types
        /// </summary>
        /// <returns></returns>
        [OperationContract] 
        IList<OrganizationType> GetOraganizationTypes();

        //TODO: more stuff needed




        /*
GetOrganizations
GetOrganization
GetUserProfile
GetProjectsOfOrganization
GetUsersOfProject
GetUsersOfOrganization
GetProjectsForUser

GetRolesForUserInOrganization
//GetSystemRolesForUser
GetSitesForProject
GetSitesForOrganization
GetUsersForSite
GetNearbySites
         */



    }

    /*
    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }
     * */
}
